﻿namespace FinMkts
{
    /// <summary>
    /// A leveraged financial instrument, e.g. a CFD
    /// </summary>
    /// <example>A CFD or a futures contract</example>
    public interface ILeveragedInstrument
    {
        /// <summary>
        /// Calculate the margin on a <see cref="Position"/>.
        /// </summary>
        /// <param name="position"></param>
        /// <returns>The margin of the <paramref name="position"/> in the <see cref="Currency"/> of the <see cref="FinancialInstrument"/></returns>
        decimal CalculateMargin(Position position);
    }

}